// Agent leader in project MAPC

/* Initial beliefs and rules */
{ include("rules.asl") }    
// Also an ordinary agent
{ include("agent.asl") }

/**************************
***LEADER SPECIFIC CODE****
**************************/

/* DELEGATION OF TARGETS */
//Decide a target for the agent
+!delegate_target(AgX,AgY,Step)[source(self)] 
					: 	jia.delegate_target(AgX,AgY,self,Step,TX,TY)
					<- 	-+target_pos(TX,TY).
+!delegate_target(AgX,AgY,Step)[source(Agent)] 
					: 	jia.delegate_target(AgX,AgY,Agent,Step,TX,TY)
					<- 	.send(Agent,tell,target_pos(TX,TY)).